import {
    createRouter,
    createWebHashHistory
} from 'vue-router'

const routes = [{
    path: '/',
    redirect: '/document',
    meta: {
        title: '首页'
    },
    children: [{
        path: '/document',
        name: 'Document',
        meta: {
            title: '归档文件'
        },
        component: () => import('@/page/quality/Document.vue')
    }, {
        path: '/test/table',
        meta: {
            title: '列表'
        },
        component: () => import('@/page/test/TestTable.vue')
    }, {
        path: '/test/page_table',
        meta: {
            title: '分页列表'
        },
        component: () => import('@/page/test/TestPageTable.vue')
    }, {
        path: '/test/dialog',
        meta: {
            title: '弹窗'
        },
        component: () => import('@/page/test/TestDialog.vue')
    }, {
        path: '/test/message',
        meta: {
            title: '消息'
        },
        component: () => import('@/page/test/Message.vue')
    }, {
        path: '/test/HelloWorld',
        meta: {
            title: '接口1'
        },
        component: () => import('@/page/test/HelloWorld.vue')
    }, {
        path: '/test/RestFul',
        meta: {
            title: '接口2'
        },
        component: () => import('@/page/test/RestFul.vue')
    }]
}]
const router = createRouter({
    history: createWebHashHistory(),
    routes
})
/* export function MyRouter() {
    return router2;
} */
const exportTest = 'exportTest'
export {
    router as MyRouter, exportTest as myExportTest
}
// 新版本写法变了？export default  变量找不到,只能是export default函数



/* import * as VueRouter from 'vue-router'
import HelloWorld from '../page/HelloWorld.vue'

const router = VueRouter.createRouter({
    history: VueRouter.createWebHashHistory(),
    routes: [
        {path: '/HelloWorld', component: HelloWorld},
    ]
})
export default router */